Skip to content

Conversation

lmittmann
Copy link

This PR is a small gas optimization for the beacon_root-contract.

  • dropped stop at the end of the contract: the execution stops, if the end of the contract is reached. an explicit stop at the end is not required.
  • dropped iszero: jumpi jumps, if the condition is non-zero. thus, the input_timestamp can be used as the condition directly. This reduces the gas consumption of the execution with valid input data by 2 (-3 for dropping the iszero, +1 for an extra jumpdest)

@lightclient
Copy link
Member

Hi @lmittmann, thanks for your PR. Unfortunately this contract is already deployed to mainnet so we won't be accepted additional changes to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants